package com.itheima.stock.api;

import com.itheima.stock.dto.LoginDTO;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.vo.CaptchaVO;
import com.itheima.stock.vo.LoginVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * @author 李智勇
 * @data 2025/10/21 21:05
 */

@RequestMapping(path = "/api")
public interface UserControllerAPI {

    /**
     *  登录接口
     * @param dto 登录参数
     * @return ResponseResult
     */
    @PostMapping(path = "/login")
    ResponseResult<LoginVO> login(@RequestBody LoginDTO dto);

    /**
     * 环境测试接口
     *
     * @return String
     */
    @GetMapping(path = "/user/test")
    String getName();

    @GetMapping(path = "/captcha")
    ResponseResult<CaptchaVO> generateCaptcha();

}

